3.24.57 \(\int \frac {x (a+b x+c x^2)}{d+e x} \, dx\) [2357]

Optimal. Leaf size=79 \[ \frac {\left (c d^2-b d e+a e^2\right ) x}{e^3}-\frac {(c d-b e) x^2}{2 e^2}+\frac {c x^3}{3 e}-\frac {d \left (c d^2-b d e+a e^2\right ) \log (d+e x)}{e^4} \]

[Out]

(a*e^2-b*d*e+c*d^2)*x/e^3-1/2*(-b*e+c*d)*x^2/e^2+1/3*c*x^3/e-d*(a*e^2-b*d*e+c*d^2)*ln(e*x+d)/e^4

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {785} \begin {gather*} -\frac {d \log (d+e x) \left (a e^2-b d e+c d^2\right )}{e^4}+\frac {x \left (a e^2-b d e+c d^2\right )}{e^3}-\frac {x^2 (c d-b e)}{2 e^2}+\frac {c x^3}{3 e} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(a + b*x + c*x^2))/(d + e*x),x]

[Out]

((c*d^2 - b*d*e + a*e^2)*x)/e^3 - ((c*d - b*e)*x^2)/(2*e^2) + (c*x^3)/(3*e) - (d*(c*d^2 - b*d*e + a*e^2)*Log[d
 + e*x])/e^4

Rule 785

Int[((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> In
t[ExpandIntegrand[(d + e*x)^m*(f + g*x)*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && N
eQ[b^2 - 4*a*c, 0] && IntegerQ[p] && (GtQ[p, 0] || (EqQ[a, 0] && IntegerQ[m]))

Rubi steps

\begin {align*} \int \frac {x \left (a+b x+c x^2\right )}{d+e x} \, dx &=\int \left (\frac {c d^2-b d e+a e^2}{e^3}+\frac {(-c d+b e) x}{e^2}+\frac {c x^2}{e}-\frac {d \left (c d^2-b d e+a e^2\right )}{e^3 (d+e x)}\right ) \, dx\\ &=\frac {\left (c d^2-b d e+a e^2\right ) x}{e^3}-\frac {(c d-b e) x^2}{2 e^2}+\frac {c x^3}{3 e}-\frac {d \left (c d^2-b d e+a e^2\right ) \log (d+e x)}{e^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 74, normalized size = 0.94 \begin {gather*} \frac {e x \left (3 e (-2 b d+2 a e+b e x)+c \left (6 d^2-3 d e x+2 e^2 x^2\right )\right )-6 \left (c d^3+d e (-b d+a e)\right ) \log (d+e x)}{6 e^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(a + b*x + c*x^2))/(d + e*x),x]

[Out]

(e*x*(3*e*(-2*b*d + 2*a*e + b*e*x) + c*(6*d^2 - 3*d*e*x + 2*e^2*x^2)) - 6*(c*d^3 + d*e*(-(b*d) + a*e))*Log[d +
 e*x])/(6*e^4)

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 79, normalized size = 1.00

method result size
norman \(\frac {\left (a \,e^{2}-b d e +c \,d^{2}\right ) x}{e^{3}}+\frac {c \,x^{3}}{3 e}+\frac {\left (b e -c d \right ) x^{2}}{2 e^{2}}-\frac {d \left (a \,e^{2}-b d e +c \,d^{2}\right ) \ln \left (e x +d \right )}{e^{4}}\) \(76\)
default \(\frac {\frac {1}{3} c \,e^{2} x^{3}+\frac {1}{2} b \,e^{2} x^{2}-\frac {1}{2} c d e \,x^{2}+a \,e^{2} x -b d e x +c \,d^{2} x}{e^{3}}-\frac {d \left (a \,e^{2}-b d e +c \,d^{2}\right ) \ln \left (e x +d \right )}{e^{4}}\) \(79\)
risch \(\frac {c \,x^{3}}{3 e}+\frac {b \,x^{2}}{2 e}-\frac {c d \,x^{2}}{2 e^{2}}+\frac {a x}{e}-\frac {b d x}{e^{2}}+\frac {c \,d^{2} x}{e^{3}}-\frac {d \ln \left (e x +d \right ) a}{e^{2}}+\frac {d^{2} \ln \left (e x +d \right ) b}{e^{3}}-\frac {d^{3} \ln \left (e x +d \right ) c}{e^{4}}\) \(95\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(c*x^2+b*x+a)/(e*x+d),x,method=_RETURNVERBOSE)

[Out]

1/e^3*(1/3*c*e^2*x^3+1/2*b*e^2*x^2-1/2*c*d*e*x^2+a*e^2*x-b*d*e*x+c*d^2*x)-d*(a*e^2-b*d*e+c*d^2)*ln(e*x+d)/e^4

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 79, normalized size = 1.00 \begin {gather*} -{\left (c d^{3} - b d^{2} e + a d e^{2}\right )} e^{\left (-4\right )} \log \left (x e + d\right ) + \frac {1}{6} \, {\left (2 \, c x^{3} e^{2} - 3 \, {\left (c d e - b e^{2}\right )} x^{2} + 6 \, {\left (c d^{2} - b d e + a e^{2}\right )} x\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*x^2+b*x+a)/(e*x+d),x, algorithm="maxima")

[Out]

-(c*d^3 - b*d^2*e + a*d*e^2)*e^(-4)*log(x*e + d) + 1/6*(2*c*x^3*e^2 - 3*(c*d*e - b*e^2)*x^2 + 6*(c*d^2 - b*d*e
 + a*e^2)*x)*e^(-3)

________________________________________________________________________________________

Fricas [A]
time = 3.36, size = 78, normalized size = 0.99 \begin {gather*} \frac {1}{6} \, {\left (6 \, c d^{2} x e + {\left (2 \, c x^{3} + 3 \, b x^{2} + 6 \, a x\right )} e^{3} - 3 \, {\left (c d x^{2} + 2 \, b d x\right )} e^{2} - 6 \, {\left (c d^{3} - b d^{2} e + a d e^{2}\right )} \log \left (x e + d\right )\right )} e^{\left (-4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*x^2+b*x+a)/(e*x+d),x, algorithm="fricas")

[Out]

1/6*(6*c*d^2*x*e + (2*c*x^3 + 3*b*x^2 + 6*a*x)*e^3 - 3*(c*d*x^2 + 2*b*d*x)*e^2 - 6*(c*d^3 - b*d^2*e + a*d*e^2)
*log(x*e + d))*e^(-4)

________________________________________________________________________________________

Sympy [A]
time = 0.11, size = 71, normalized size = 0.90 \begin {gather*} \frac {c x^{3}}{3 e} - \frac {d \left (a e^{2} - b d e + c d^{2}\right ) \log {\left (d + e x \right )}}{e^{4}} + x^{2} \left (\frac {b}{2 e} - \frac {c d}{2 e^{2}}\right ) + x \left (\frac {a}{e} - \frac {b d}{e^{2}} + \frac {c d^{2}}{e^{3}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*x**2+b*x+a)/(e*x+d),x)

[Out]

c*x**3/(3*e) - d*(a*e**2 - b*d*e + c*d**2)*log(d + e*x)/e**4 + x**2*(b/(2*e) - c*d/(2*e**2)) + x*(a/e - b*d/e*
*2 + c*d**2/e**3)

________________________________________________________________________________________

Giac [A]
time = 1.25, size = 82, normalized size = 1.04 \begin {gather*} -{\left (c d^{3} - b d^{2} e + a d e^{2}\right )} e^{\left (-4\right )} \log \left ({\left | x e + d \right |}\right ) + \frac {1}{6} \, {\left (2 \, c x^{3} e^{2} - 3 \, c d x^{2} e + 6 \, c d^{2} x + 3 \, b x^{2} e^{2} - 6 \, b d x e + 6 \, a x e^{2}\right )} e^{\left (-3\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(c*x^2+b*x+a)/(e*x+d),x, algorithm="giac")

[Out]

-(c*d^3 - b*d^2*e + a*d*e^2)*e^(-4)*log(abs(x*e + d)) + 1/6*(2*c*x^3*e^2 - 3*c*d*x^2*e + 6*c*d^2*x + 3*b*x^2*e
^2 - 6*b*d*x*e + 6*a*x*e^2)*e^(-3)

________________________________________________________________________________________

Mupad [B]
time = 2.34, size = 85, normalized size = 1.08 \begin {gather*} x^2\,\left (\frac {b}{2\,e}-\frac {c\,d}{2\,e^2}\right )+x\,\left (\frac {a}{e}-\frac {d\,\left (\frac {b}{e}-\frac {c\,d}{e^2}\right )}{e}\right )-\frac {\ln \left (d+e\,x\right )\,\left (c\,d^3-b\,d^2\,e+a\,d\,e^2\right )}{e^4}+\frac {c\,x^3}{3\,e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(a + b*x + c*x^2))/(d + e*x),x)

[Out]

x^2*(b/(2*e) - (c*d)/(2*e^2)) + x*(a/e - (d*(b/e - (c*d)/e^2))/e) - (log(d + e*x)*(c*d^3 + a*d*e^2 - b*d^2*e))
/e^4 + (c*x^3)/(3*e)

________________________________________________________________________________________